Set default ruby and gem versions to 1.9.1 in huginn_production

If ruby is set to default system version, the environment
provisioned with huginn_production fails to process events.

Also, the default environment misses rubygems. Here is what
I see in dj-1.log:

`require': no such file to load -- rubygems (LoadError)

This changeset will update the default system ruby to 1.9.1 and
install rubygems package.

Konstantin Nazarov 11 years ago
parent
commit
68cb74dede
1 changed files with 8 additions and 1 deletions
  1. 8 1
      deployment/site-cookbooks/huginn_production/recipes/default.rb

+ 8 - 1
deployment/site-cookbooks/huginn_production/recipes/default.rb

@@ -14,10 +14,17 @@ group "huginn" do
14 14
   members ["huginn"]
15 15
 end
16 16
 
17
-%w("ruby1.9.1" "ruby1.9.1-dev" "libxslt-dev" "libxml2-dev" "curl" "libshadow-ruby1.8" "libmysqlclient-dev" "libffi-dev" "libssl-dev").each do |pkg|
17
+%w("ruby1.9.1" "ruby1.9.1-dev" "libxslt-dev" "libxml2-dev" "curl" "libshadow-ruby1.8" "libmysqlclient-dev" "libffi-dev" "libssl-dev" "rubygems").each do |pkg|
18 18
   package("#{pkg}")
19 19
 end
20 20
 
21
+bash "Setting default ruby version to 1.9" do
22
+  code <<-EOH
23
+    update-alternatives --set ruby /usr/bin/ruby1.9.1
24
+    update-alternatives --set gem /usr/bin/gem1.9.1
25
+  EOH
26
+end
27
+
21 28
 gem_package("rake")
22 29
 gem_package("bundle")
23 30